package com.ai.entity.alarm;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.util.StringUtils;

@Data
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SteelCoilLocateTailPage extends BasePage<SteelCoilLocateTail> {

    @ApiModelProperty("  signal的值分别为：‘dw-00’ 代表“未发现尾部”，‘dw-01’ 代表“定尾将到位”，‘dw-02’ 代表“定尾到位”，‘dw-03’ 代表“定尾未到位”，‘dw-04’ 代表“定尾异常”，‘信号异常’ 代表“收到的信号值不为1或2”\n")
    private String signals;

    @Override
    public QueryWrapper<SteelCoilLocateTail> getQuery(QueryWrapper<SteelCoilLocateTail> queryWrapper) {
        super.getQuery(queryWrapper)
                .eq(!(StringUtils.isEmpty(signals)), "signals", signals)
                .orderByDesc("id");
        return queryWrapper;
    }
}
